﻿/*
 * Copyright (C) 2023 - 2024 lchfj.cn
 * 
 * This file is part of FastestHost.
 * 
 * FastestHost is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
 * 
 * FastestHost is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License along with FastestHost. If not, see <https://www.gnu.org/licenses/>.
 */

namespace Cn.Lchfj.FastestHost.Network
{
    internal record UpdateInfo
    {
        public required string Hash { get; init; }
        public required Uri Url { get; init; }
        public string? Content { get; init; }

        internal bool IsValidate()
        {
            return !string.IsNullOrWhiteSpace(Hash) && Url is not null;
        }
    }
}